home *** CD-ROM | disk | FTP | other *** search
/ Pivo 7 / Pivo_7_1998_Tengu.d64 / B joy tester BU (.txt) next >
Commodore BASIC  |  2023-02-26  |  2KB  |  46 lines

  1. 100 rem    ***    joytest 64    ***
  2. 105 :
  3. 110 rem    ***    k.dybowski    ***
  4. 115 :
  5. 120 :
  6. 125 s$=chr$(147):prints$:print:input"port 1 cz 2  (1/2) : ";p:c$=chr$(34)
  7. 130 if p=1 then p=56321:goto145
  8. 135 if p=2 then p=56320:goto145
  9. 140 goto 125
  10. 145 p$="wartosc "+c$+"not peek("+right$(str$(p),5)+") and 32"+c$+" = "
  11. 150 print s$:gosub 265
  12. 155 x1=160:y1=130:x2=197:y2=90:x3=125:y3=168:v=53248:s1=v+1:s2=v+2:s3=v+3
  13. 160 pokev+32,6:pokev+33,1:poke646,0
  14. 165 :
  15. 170 pokev+39,7:pokev+40,7:pokev+23,0:pokev+29,3:pokev+23,3:pokev+21,3
  16. 175 :
  17. 180 a = not peek(p) and 31:w=0:pokev+40,7
  18. 185 if a=0 or a=16 then pokev,x1:pokes1,y1:pokes2,x1:pokes3,y1
  19. 190 if a=>16 then w=16:pokev+40,2:a=(a and 15)
  20. 195 if a=1 then pokev,x1:pokes1,y2:pokes2,x1:pokes3,y2:goto240
  21. 200 if a=9 then pokev,x2:pokes1,y2:pokes2,x2:pokes3,y2:goto240
  22. 205 if a=8 then pokev,x2:pokes1,y1:pokes2,x2:pokes3,y1:goto240
  23. 210 if a=10 then pokev,x2:pokes1,y3:pokes2,x2:pokes3,y3:goto240
  24. 215 if a=2 then pokev,x1:pokes1,y3:pokes2,x1:pokes3,y3:goto240
  25. 220 if a=6 then pokev,x3:pokes1,y3:pokes2,x3:pokes3,y3:goto240
  26. 225 if a=4 then pokev,x3:pokes1,y1:pokes2,x3:pokes3,y1:goto240
  27. 230 if a=5 then pokev,x3:pokes1,y2:pokes2,x3:pokes3,y2
  28. 235 :
  29. 240 z=a+w:if len(str$(z))=2 then z$="0"+right$(str$(z),1):goto 250
  30. 245 z$=right$(str$(z),2)
  31. 250 printtab(1);p$z$chr$(145)chr$(157)chr$(32)
  32. 255 goto 180
  33. 260 :
  34. 265 for j=832 to 959:read q:poke j,q:next:poke 2040,13:poke 2041,14
  35. 270 for i=1 to 14:t=t+40:for x=55510+t to 55521+t:pokex,0:pokex-54272,160:next
  36. 275 next:return
  37. 280 :
  38. 285 data 000,126,000,001,255,128,007,255,224,015,255,240,031,255,248,063
  39. 290 data 255,252,063,255,252,126,000,126,124,000,062,252,000,063,252,000
  40. 295 data 063,252,000,063,124,000,062,126,000,126,063,255,252,063,255,252
  41. 300 data 031,255,248,015,255,240,007,255,224,001,255,128,000,126,000,000
  42. 305 data 000,126,000,001,255,128,007,255,224,015,255,240,031,255,248,063
  43. 310 data 255,252,063,255,252,127,255,254,127,255,254,255,255,255,255,255
  44. 315 data 255,255,255,255,127,255,254,127,255,254,063,255,252,063,255,252
  45. 320 data 031,255,248,015,255,240,007,255,224,001,255,128,000,126,000,000
  46.